package dart

class Classification {
	String name
	Float scoreMultiplier
	Float penaltyMultiplier

	Boolean enabled = true

	static constraints = {
		scoreMultiplier(min: 0F)
		penaltyMultiplier(min: 0F)
	}

	Float getScore(Integer points) {
		if (points.intValue() < 0) {
			return points * penaltyMultiplier
		}
		return points * scoreMultiplier
	}
}
